local guanxing = fk.CreateSkill{
  name = "lingling__guanxing",
}

Fk:loadTranslationTable{
  ["lingling__guanxing"] = "观星",
  [":lingling__guanxing"] = "每回合限一次，准备阶段或结束阶段，你可以视为使用【占卜吉凶】。",
}

guanxing:addEffect(fk.EventPhaseStart, {
  anim_type = "control",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(guanxing.name) and
      (player.phase == Player.Start or player.phase == Player.Finish) and
      player:canUse(Fk:cloneCard("ling__divination")) and
      player:usedSkillTimes(guanxing.name, Player.HistoryTurn) == 0
  end,
  on_use = function(self, event, target, player, data)
    player.room:useVirtualCard("ling__divination", nil, player, player, guanxing.name)
  end,
})

return guanxing
